Use minimum API version for bulk operations#6697
Conversation
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3553 tests passing in 1415 suites. Report generated by 🧪jest coverage report action from a96993e |
packages/app/src/cli/services/bulk-operations/bulk-operation-status.test.ts
Outdated
Show resolved
Hide resolved
jordanverasamy
left a comment
There was a problem hiding this comment.
thank you for putting this together <3
a694179 to
d894b0c
Compare
0fbeaaa to
687de29
Compare
|
/snapit |
packages/app/src/cli/services/bulk-operations/execute-bulk-operation.test.ts
Outdated
Show resolved
Hide resolved
|
/snapit |
2 similar comments
|
/snapit |
|
/snapit |
d894b0c to
544183d
Compare
847e0d3 to
8cffe52
Compare
544183d to
9d4706e
Compare
8cffe52 to
28408ea
Compare
|
/snapit |
|
/snapit |
28408ea to
d3c6bcf
Compare
29170fd to
b7caf67
Compare
|
/snapit |
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/api/admin.d.ts@@ -41,6 +41,14 @@ export declare function adminRequestDoc<TResult, TVariables extends Variables>(o
* @returns - An array of supported API versions.
*/
export declare function supportedApiVersions(session: AdminSession, preferredBehaviour?: RequestModeInput): Promise<string[]>;
+/**
+ * GraphQL query to retrieve all API versions.
+ *
+ * @param session - Shopify admin session including token and Store FQDN.
+ * @param preferredBehaviour - Custom request behaviour for retries and timeouts.
+ * @returns - An array of supported and unsupported API versions.
+ */
+export declare function fetchApiVersions(session: AdminSession, preferredBehaviour?: RequestModeInput): Promise<ApiVersion[]>;
/**
* Returns the Admin API URL for the given store and version.
*
@@ -50,6 +58,10 @@ export declare function supportedApiVersions(session: AdminSession, preferredBeh
* @returns - Admin API URL.
*/
export declare function adminUrl(store: string, version: string | undefined, session?: AdminSession): string;
+interface ApiVersion {
+ handle: string;
+ supported: boolean;
+}
/**
* Executes a REST request against the Admin API.
*
@@ -82,4 +94,5 @@ export interface RestResponse {
headers: {
[key: string]: string[];
};
-}
\ No newline at end of file
+}
+export {};
\ No newline at end of file
|

WHY are these changes introduced?
This PR improves API version handling and error presentation in bulk operations to provide a more consistent and user-friendly experience.
WHAT is this pull request doing?
renderWarningtorenderErrorto better reflect severityresolveApiVersionfunction that intelligently selects the appropriate API version based on:How to test your changes?
Measuring impact
How do we know this change was effective? Please choose one:
Checklist